package com.jbh.wanandroidkotlin.activity

import android.content.Intent
import android.os.Bundle
import android.os.Handler
import com.jbh.wanandroidkotlin.R
import com.jbh.wanandroidkotlin.manager.UserInfoManager

class WelcomeActivity :  BaseActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_welcom)
        val handler =  Handler(this.mainLooper)
        handler.postDelayed(Runnable {
            if (UserInfoManager.newInstance().isLogin()){
                startActivity(Intent(this,MainActivity::class.java))
            }else{
                startActivity(Intent(this,LoginActivity::class.java))
            }
            finish()
        },3000)
    }
}